hakai_jsp <- occurrence(datasetid = '76e20e5d-0bbc-4a0f-90c7-598a3edd4258', mof = TRUE)
## Retrieved 5000 records of approximately 311595 (1%) Retrieved 10000 records of
## approximately 311595 (3%) Retrieved 15000 records of approximately 311595 (4%)
## Retrieved 20000 records of approximately 311595 (6%) Retrieved 25000 records of
## approximately 311595 (8%) Retrieved 30000 records of approximately 311595 (9%)
## Retrieved 35000 records of approximately 311595 (11%) Retrieved 40000 records of
## approximately 311595 (12%) Retrieved 45000 records of approximately 311595 (14%)
## Retrieved 50000 records of approximately 311595 (16%) Retrieved 55000 records of
## approximately 311595 (17%) Retrieved 60000 records of approximately 311595 (19%)
## Retrieved 65000 records of approximately 311595 (20%) Retrieved 70000 records of
## approximately 311595 (22%) Retrieved 75000 records of approximately 311595 (24%)
## Retrieved 80000 records of approximately 311595 (25%) Retrieved 85000 records of
## approximately 311595 (27%) Retrieved 90000 records of approximately 311595 (28%)
## Retrieved 95000 records of approximately 311595 (30%) Retrieved 100000 records
## of approximately 311595 (32%) Retrieved 105000 records of approximately 311595
## (33%) Retrieved 110000 records of approximately 311595 (35%) Retrieved 115000
## records of approximately 311595 (36%) Retrieved 120000 records of approximately
## 311595 (38%) Retrieved 125000 records of approximately 311595 (40%) Retrieved
## 130000 records of approximately 311595 (41%) Retrieved 135000 records of
## approximately 311595 (43%) Retrieved 140000 records of approximately 311595
## (44%) Retrieved 145000 records of approximately 311595 (46%) Retrieved 150000
## records of approximately 311595 (48%) Retrieved 155000 records of approximately
## 311595 (49%) Retrieved 160000 records of approximately 311595 (51%) Retrieved
## 165000 records of approximately 311595 (52%) Retrieved 170000 records of
## approximately 311595 (54%) Retrieved 175000 records of approximately 311595
## (56%) Retrieved 180000 records of approximately 311595 (57%) Retrieved 185000
## records of approximately 311595 (59%) Retrieved 190000 records of approximately
## 311595 (60%) Retrieved 195000 records of approximately 311595 (62%) Retrieved
## 200000 records of approximately 311595 (64%) Retrieved 205000 records of
## approximately 311595 (65%) Retrieved 210000 records of approximately 311595
## (67%) Retrieved 215000 records of approximately 311595 (68%) Retrieved 220000
## records of approximately 311595 (70%) Retrieved 225000 records of approximately
## 311595 (72%) Retrieved 230000 records of approximately 311595 (73%) Retrieved
## 235000 records of approximately 311595 (75%) Retrieved 240000 records of
## approximately 311595 (77%) Retrieved 245000 records of approximately 311595
## (78%) Retrieved 250000 records of approximately 311595 (80%) Retrieved 255000
## records of approximately 311595 (81%) Retrieved 260000 records of approximately
## 311595 (83%) Retrieved 265000 records of approximately 311595 (85%) Retrieved
## 270000 records of approximately 311595 (86%) Retrieved 275000 records of
## approximately 311595 (88%) Retrieved 280000 records of approximately 311595
## (89%) Retrieved 285000 records of approximately 311595 (91%) Retrieved 290000
## records of approximately 311595 (93%) Retrieved 295000 records of approximately
## 311595 (94%) Retrieved 300000 records of approximately 311595 (96%) Retrieved
## 305000 records of approximately 311595 (97%) Retrieved 310000 records of
## approximately 311595 (99%) Retrieved 311595 records of approximately 311595
## (100%)
map_leaflet(hakai_jsp)
ricker_beamtrawl_90_93 <- occurrence(datasetid = 'd648e5d9-4b4e-46a1-90b6-0fe8380ada2e', mof = TRUE)

map_leaflet(ricker_beamtrawl_90_93)

map_leaflet(nerka_dataasets)
wkt <- "MULTIPOLYGON (((-121.6322 48.2042, -129.5839 51.28585, -128.1254 51.86893, -120.9529 48.58859, -121.6322 48.2042)))"


salish_sea <- occurrence(scientificname = 'Oncorhynchus nerka', geometry = wkt, mof = TRUE)
## Retrieved 5000 records of approximately 121460 (4%) Retrieved 10000 records of
## approximately 121460 (8%) Retrieved 15000 records of approximately 121460 (12%)
## Retrieved 20000 records of approximately 121460 (16%) Retrieved 25000 records of
## approximately 121460 (20%) Retrieved 30000 records of approximately 121460 (24%)
## Retrieved 35000 records of approximately 121460 (28%) Retrieved 40000 records of
## approximately 121460 (32%) Retrieved 45000 records of approximately 121460 (37%)
## Retrieved 50000 records of approximately 121460 (41%) Retrieved 55000 records of
## approximately 121460 (45%) Retrieved 60000 records of approximately 121460 (49%)
## Retrieved 65000 records of approximately 121460 (53%) Retrieved 70000 records of
## approximately 121460 (57%) Retrieved 75000 records of approximately 121460 (61%)
## Retrieved 80000 records of approximately 121460 (65%) Retrieved 85000 records of
## approximately 121460 (69%) Retrieved 90000 records of approximately 121460 (74%)
## Retrieved 95000 records of approximately 121460 (78%) Retrieved 100000 records
## of approximately 121460 (82%) Retrieved 105000 records of approximately 121460
## (86%) Retrieved 110000 records of approximately 121460 (90%) Retrieved 115000
## records of approximately 121460 (94%) Retrieved 120000 records of approximately
## 121460 (98%) Retrieved 121460 records of approximately 121460 (100%)
names(salish_sea)
##   [1] "country"                       "date_year"                    
##   [3] "habitat"                       "references"                   
##   [5] "institutionID"                 "scientificNameID"             
##   [7] "scientificName"                "dropped"                      
##   [9] "aphiaID"                       "language"                     
##  [11] "decimalLatitude"               "phylumid"                     
##  [13] "familyid"                      "occurrenceStatus"             
##  [15] "basisOfRecord"                 "terrestrial"                  
##  [17] "superclass"                    "maximumDepthInMeters"         
##  [19] "id"                            "order"                        
##  [21] "superclassid"                  "dataset_id"                   
##  [23] "stateProvince"                 "decimalLongitude"             
##  [25] "date_end"                      "speciesid"                    
##  [27] "occurrenceID"                  "license"                      
##  [29] "date_start"                    "genus"                        
##  [31] "samplingProtocol"              "bibliographicCitation"        
##  [33] "eventDate"                     "eventID"                      
##  [35] "brackish"                      "scientificNameAuthorship"     
##  [37] "coordinateUncertaintyInMeters" "absence"                      
##  [39] "subfamily"                     "taxonRank"                    
##  [41] "eventRemarks"                  "genusid"                      
##  [43] "originalScientificName"        "marine"                       
##  [45] "minimumDepthInMeters"          "subphylumid"                  
##  [47] "subfamilyid"                   "institutionCode"              
##  [49] "countryCode"                   "wrims"                        
##  [51] "date_mid"                      "eventTime"                    
##  [53] "class"                         "orderid"                      
##  [55] "geodeticDatum"                 "kingdom"                      
##  [57] "classid"                       "phylum"                       
##  [59] "lifeStage"                     "species"                      
##  [61] "locationID"                    "coordinatePrecision"          
##  [63] "subphylum"                     "family"                       
##  [65] "kingdomid"                     "node_id"                      
##  [67] "flags"                         "sss"                          
##  [69] "depth"                         "shoredistance"                
##  [71] "sst"                           "bathymetry"                   
##  [73] "mof"                           "year"                         
##  [75] "catalogNumber"                 "recordNumber"                 
##  [77] "locality"                      "vernacularName"               
##  [79] "datasetName"                   "originalNameUsage"            
##  [81] "occurrenceRemarks"             "modified"                     
##  [83] "recordedBy"                    "rightsHolder"                 
##  [85] "dynamicProperties"             "individualCount"              
##  [87] "day"                           "collectionCode"               
##  [89] "month"                         "organismID"                   
##  [91] "footprintWKT"                  "specificEpithet"              
##  [93] "startDayOfYear"                "accessRights"                 
##  [95] "locationRemarks"               "dataGeneralizations"          
##  [97] "sex"                           "type"                         
##  [99] "collectionID"                  "verbatimEventDate"            
## [101] "verbatimLatitude"              "higherClassification"         
## [103] "preparations"                  "verbatimLongitude"            
## [105] "datasetID"
map_leaflet(salish_sea)
ss_mof <- salish_sea %>% 
  select(institutionCode, mof, datasetName) %>% 
  drop_na(mof)